<?php
class Action
{
	
	function index(){
		$model_info = _model('admin_model')->getList();
		
		foreach($model_info as $val){
			
		$title = _model('admin_resource')->read(array('model_id'=>$val['id']));
		
		echo "<a herf={$val['id']}>".$val['name']."</a><br>";
		
		echo $title['title']."<br>";
		
		}
	}
	function like(){
		
		if(!$p = _GET('q', 'admin')){
			
			//msg('Q is not empty');
			
		}
		$info=_model('admin_resource')->read(array('title'=>$p));
		var_dump($info);
		
		$model_info=_model('admin_attribute_value')->read(array('res_id'=>$info['id']));
		
		var_dump($model_info);
		
		$attribute_info=_model('admin_attribute')->read(array('id'=>$model_info['attribute_id']));
		
		
		var_dump($attribute_info);
	}
	}